var __extends =
    (this && this.__extends) ||
    (function () {
      var n = function (t, e) {
        return (n =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (n, t) {
              n.__proto__ = t;
            }) ||
          function (n, t) {
            for (var e in t)
              Object.prototype.hasOwnProperty.call(t, e) && (n[e] = t[e]);
          })(t, e);
      };
      return function (t, e) {
        function o() {
          this.constructor = t;
        }
        if ("function" != typeof e && null !== e)
          throw new TypeError(
            "Class extends value " + String(e) + " is not a constructor or null"
          );
        n(t, e),
          (t.prototype =
            null === e
              ? Object.create(e)
              : ((o.prototype = e.prototype), new o()));
      };
    })(),
  RechargeMoneyGiftDialog = (function (n) {
    function t() {
      var t = n.call(this) || this;
      return (
        (t.onLoadLingQuDataFn = {
          caller: t,
          code: 15801,
          method: function (n) {
            ToastView.toastView(n.msg), t.close();
          },
        }),
        t.btn_lingqu_one.on(Laya.Event.CLICK, t, t.onClickLingQuMoneyFn),
        t.btn_lingqu_two.on(Laya.Event.CLICK, t, t.onClickLingQuMoneyFn),
        t.btn_lingqu_three.on(Laya.Event.CLICK, t, t.onClickLingQuMoneyFn),
        WebSocketService.addListener(t.onLoadLingQuDataFn),
        t
      );
    }
    return (
      __extends(t, n),
      (t.showRechargeDiaog = function (n) {
        null == this.moneyDialog &&
          ((this.moneyDialog = new t()), (this.moneyDialog.zOrder = 1e3)),
          this.moneyDialog.popup(!0);
      }),
      (t.prototype.onClickLingQuMoneyFn = function (n) {
        var t = "0";
        "item0" == n.target.name
          ? (t = "1")
          : "item1" == n.target.name
          ? (t = "2")
          : "item2" == n.target.name && (t = "3"),
          WebSocketService.send({ c: 15801, d: { type: t } });
      }),
      (t.close = function () {
        this.moneyDialog && this.moneyDialog.close();
      }),
      t
    );
  })(ui.MoneyBankController.RechargeMoneyGiftDialogUI);
